{% extends "base.html" %}
{% block javascript %}
    <script>
        $(document).ready(function(){
            $("#encryption").click(function(){
                var encry = $("#encry").val();
                if (encry == ''){
                    sweetAlert("", "加密内容不能为空,请输入加密数据", "info");
                    return false;
                }
            });
             $("#decrypta").click(function(){
                var  decry= $("#decry").val();
                if (decry == ''){
                    sweetAlert("", "解密内容不能为空,请输入解密数据", "info");
                    return false;
                }
            });
            $("#encryption1").click(function(){
                var encry = $("#encry1").val();
                if (encry == ''){
                    sweetAlert("", "加密内容不能为空,请输入加密数据", "info");
                    return false;
                }
            });
             $("#decrypta1").click(function(){
                var  decry= $("#decry1").val();
                if (decry == ''){
                    sweetAlert("", "解密内容不能为空,请输入解密数据", "info");
                    return false;
                }
            });
        });
    </script>
{% endblock %}
{% block main %}
        <div id="page-wrapper">

            <div class="container-fluid">

                <!-- Page Heading -->
                <div class="row">
                    <div class="col-lg-12">
                        <h3 class="page-header">
                            Encryption and decrypta
                        </h3>
                        <ol class="breadcrumb">
                            <li>
                                <i class="fa fa-dashboard"></i>  <a href="../index">Dashboard</a>
                            </li>
                            <li>
                                <i class="fa fa-briefcase"></i>  <a>Test Tools</a>
                            </li>
                            <li class="active">
                                <i class="fa fa-delicious"></i> Encryption and decrypta
                            </li>
                        </ol>
                    </div>
                </div>
                <div class="row">
                    <div class="col-lg-1">
                        <strong style="font-weight:bold;font-size: large; color: #8A8F94;padding-left: 10%;">Andriod:</strong>
                    </div>
                    <div class="col-lg-5" style="padding-left: 5%;margin-top: 5px">
                        <form method= 'get'>
                            <input name="decry_android" id="decry" class="input-sm" style="width: 80%;" placeholder="请输入解密数据">
                            <input type="submit" id='decrypta' class='btn btn-info' value='解密'/>
                        </form>
                    </div>
                    <div class="col-lg-5" style="padding-left: 5%;margin-top: 5px">
                        <form method= 'get'>
                            <input name="encry_android" id="encry" class="input-sm" style="width: 80%;" placeholder="请输入加密数据" >
                            <input type="submit" id='encryption' class='btn btn-info' value='加密' />
                        </form>
                    </div>
                </div>
                <br>
                <div class="row">
                    <div class="col-lg-1">
                        <strong style="font-weight:bold;font-size: large; color: #8A8F94;padding-left: 10%;">IOS:</strong>
                    </div>
                    <div class="col-lg-5"  style="padding-left: 5%;margin-top: 5px">
                        <form method= 'get'>
                            <input name="decry_ios" id="decry1" class="input-sm" style="width: 80%;" placeholder="请输入解密数据">
                            <input type="submit" id='decrypta1' class='btn btn-info' value='解密'/>
                        </form>
                    </div>
                    <div class="col-lg-5" style="padding-left: 5%;margin-top: 5px">
                        <form method= 'get'>
                            <input name="encryp_ios" id="encry1" class="input-sm" style="width: 80%;" placeholder="请输入加密数据" >
                            <input type="submit" id='encryption1' class='btn btn-info' value='加密' />
                        </form>
                    </div>
                </div>
                <div class="col-lg-12" style="min-height: 400px;">
                    <br>
                    <span style="font-weight:bold;font-size: large; color: #8A8F94;">结果:</span><br>
                    {% if state == 2 %}
                        <h4 style="text-align: center;padding-top: 60px;"><img src="../static/icon/fail.gif"/>{{ result }}</h4>
                    {% elif state == 0 %}
                        <h4 style="text-align: center;padding-top: 60px;"><img src="../static/icon/scare.gif"/>&nbsp;{{ result }}</h4>
                    {% else %}
                    <div style="padding-left: 60px;word-wrap:break-word; word-break:break-all; overflow: hidden;width: 700px;margin-top: 20px;">{{ result }}</div>
                    {% endif %}
                </div>

        </div>

        <!-- /#page-wrapper -->

    </div>
    <!-- /#wrapper -->

    <!-- jQuery -->
    <script src="../static/js/jquery.js"></script>
    <script src="../static/js/sweet-alert.min.js"></script>
    <link rel="stylesheet" type="text/css" href="../static/css/sweet-alert.css">

    <!-- Bootstrap Core JavaScript -->
    <script src="../static/js/bootstrap.min.js"></script>
{% endblock %}

</body>

</html>
